package com.foreknow.demo2;

/**
 * for循环
 */
public class LoopDemo1 {
    public static void main(String[] args) {
        for (int i = 1; i <= 3;i++) {
            System.out.println("i的值是：" + i);
        }
        System.out.println("111111111111111111");

        int sum = 0;
        for (int i = 1;i <= 50;i++){
            sum+=i;//sun = sum + i
        }
        System.out.println(sum);
    }
}
